﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="List.aspx.vb" Inherits="Prototype.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="Details.aspx?ID={0}" DataTextField="cModel" 
                HeaderText="Model" SortExpression="ID">
            <ItemStyle ForeColor="#7F878F" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:HyperLinkField>
            <asp:BoundField DataField="cName" HeaderText="Type" SortExpression="cName">
            <ControlStyle Height="100px" Width="100px" />
            <ItemStyle ForeColor="#7F878F" Height="100px" HorizontalAlign="Center" 
                VerticalAlign="Middle" Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="Engine" HeaderText="Engine" SortExpression="Engine">
            <ControlStyle Height="100px" />
            <ItemStyle ForeColor="#7F878F" Height="100px" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:BoundField DataField="Topspeed" HeaderText="Topspeed" 
                SortExpression="Topspeed">
            <ControlStyle Height="100px" />
            <ItemStyle ForeColor="#7F878F" Height="100px" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:ImageField DataImageUrlField="cImage" HeaderText="Thumbnail">
                <ControlStyle Height="150px" Width="250px" />
                <ItemStyle Height="100px" Width="100px" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [cModel], [cName], [Engine], [Topspeed], [cImage], [ID] FROM [cars]">
    </asp:SqlDataSource>
    <br />
    <br />
&nbsp;
</asp:Content>
